package com.dongchen.designpatter.chapter04.simplefactory.sample01;

import lombok.extern.slf4j.Slf4j;

/**
 * @author dongchen
 * @time 2021/9/17
 */
@Slf4j
public class Client {
    public static void main(String[] args) {
        try {
            TV tv;
            String brandName = XMLUtil.getBrandName();
            tv = TVFactory.produceTV(brandName);
            tv.play();
        } catch (Exception e) {
            log.error("Product TV is product error, Sorry, the message of error is {}", e.getMessage(), e);
        }
    }
}
